<template>
  <el-form ref="form" label-position="right" class="j-attribute-set" size="mini" label-width="80px">
    <el-form-item label="按钮名称">
      <el-input v-model="data.name"></el-input>
    </el-form-item>
    <el-form-item label="按钮类型">
      <el-select v-model="data.type" placeholder="请选择活动区域">
        <el-option label="主要按钮" value="primary"></el-option>
        <el-option label="成功按钮" value="success"></el-option>
        <el-option label="信息按钮" value="info"></el-option>
        <el-option label="警告按钮" value="warning"></el-option>
        <el-option label="危险按钮" value="danger"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="按钮尺寸">
      <el-select v-model="data.size" placeholder="请选择活动区域">
        <el-option label="大" value="medium"></el-option>
        <el-option label="中" value="small"></el-option>
        <el-option label="小" value="mini"></el-option>
      </el-select>
    </el-form-item>
  </el-form>
</template>
<script type="text/javascript">
export default {
  props: {
    value: [Array, Object, Number, String]
  },
  computed: {
    data: {
      get: function() {
        return this.value;
      },
      set: function(value) {
        this.$emit('input', value);
      }
    }
  }

}

</script>
<style type="text/css" lang="scss">
.j-attribute-set {
  padding: 10px;
}

.el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
  margin-bottom: 10px;
}

.el-form--label-top .el-form-item__label {
  float: none;
  display: inline-block;
  text-align: left;
  padding: 0;
}

</style>
